import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询公共参数
 * @param {*} query
 * @returns
 */
export function queryData(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/findS',
    method: 'get',
    params: query
  })
}

// 获取新增时候的运算符下拉框
export function findoperator() {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/findoperator',
    method: 'get',
  })
}

// 查询合集
export function findcvtype(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/findabtermlist',
    method: 'get',
    params: query
  })
}

//查询a曲线
export function findAtermList(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/findAtermList',
    method: 'get',
    params: query
  })
}

//查询b曲线
export function findBtermList(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/findBtermList',
    method: 'get',
    params: query
  })
}

// 新增
export function addS(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/addS',
    method: 'post',
    data
  })
}
// 修改
export function updateS(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/updateS',
    method: 'post',
    data
  })
}
// 删除
export function delS(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/delS',
    method: 'get',
    params:query
  })
}
